package org.itboys.admin.service.lasted.process;


import org.itboys.admin.entity.lasted.process.SystemProcessDetail;
import org.itboys.mongodb.core.MongoDataSource;
import org.itboys.mongodb.service.BaseMongoService;
import org.itboys.param.PageResult;
import org.itboys.param.ParamUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import javax.annotation.Resource;
import javax.servlet.http.HttpServletRequest;
import java.util.Map;


/**
 * 作者：jiangxiong
 * 日期：2017年2月27日
 * 联系方式 ：empty90911@126.com
 * 描述：系统_流程_详细_service
 */
@Service
public class SystemProcessDetailService extends BaseMongoService<SystemProcessDetail> {
    @Autowired
    private SystemProcessTemplateNodeService templateNodeService;



    @Resource(name = "adminDS")
    private MongoDataSource ds;

    @Override
    protected MongoDataSource getMongoDataSource() {
        return ds;
    }

    @Override
    protected Class<SystemProcessDetail> getEntityClass() {
        return SystemProcessDetail.class;
    }

    /**
     * 分页获取所有流程节点信息信息
     * @param request
  //   * @param processId
     * @return
     */
    public PageResult<SystemProcessDetail> select(HttpServletRequest request){
        Map<String,Object> param =ParamUtil.packageMongoExactParam(request,"status","processId","outClassId","outClassName");
        param.put("isDeleted", 0);
        Map<String,String> containsparam = ParamUtil.packageMongoVagueParam(request,"");
        PageResult<SystemProcessDetail> result=super.containpageQuery(request,containsparam,param);
        return result;
    }





}
